Hello,
I am using -putdocx- entirely for writing the results portion of my manuscript which is generously sprinkled with italicized gene names as well as superscripted letters (e.g. TP53SH) within italicized gene names. Ideally, I want the final docx coming out of the do file to contain these formatted characters.
For one,
For instance, "TP53mutt" needs to be TP53MUT (the '-mut' suffix is hard to isolate in MS Word Find/replace and hence the 'mutt' tag) TP53mut would too non-specific for Find/Replace. I have several such words and letters (TP53shit, TP53misn, TP53nmis for single-hit, missense and non-missense mutations). Would appreciate any pointers for a bespoke code block.
I am using -putdocx- entirely for writing the results portion of my manuscript which is generously sprinkled with italicized gene names as well as superscripted letters (e.g. TP53SH) within italicized gene names. Ideally, I want the final docx coming out of the do file to contain these formatted characters.
For one,
- I don't want to chop up putdocx statements for each instance of a formatted character into separate lines of code like I see in the help file.
- Nor do I want to add <<dyndocx>> code blocks around those characters, both of which looked cumbersome and make the putdocx text blocks very hard to read.
For instance, "TP53mutt" needs to be TP53MUT (the '-mut' suffix is hard to isolate in MS Word Find/replace and hence the 'mutt' tag) TP53mut would too non-specific for Find/Replace. I have several such words and letters (TP53shit, TP53misn, TP53nmis for single-hit, missense and non-missense mutations). Would appreciate any pointers for a bespoke code block.
Code:
*1 Clear putdocx file from memory, if any. putdocx clear *3 Start the putdocx file // Create a document with a header putdocx begin, header(head) // Define the header content, and include page numbers putdocx paragraph, toheader(head) font(,14) putdocx text ("Results: Outcome analysis") **# Results 1. Cohort summary*-------------------------- putdocx paragraph, style(Heading1) font("arial", 13, black) halign(both) putdocx text ("Baseline cohort outcome summary") *-------------------------------------------------------------------- putdocx paragraph, font("arial", 11, black) spacing(line, 22pt) putdocx text ("The median duration of follow up from diagnosis of TP53mutt myeloid neoplasm to study exit (censoring or death) was......") gv p53 \\ program to step out of pwd to get that image putdocx image ".\Figure_02.tiff", width(2) putdocx save testing.docx, replace
Comment